package cn.com.ejiakanghu.dto;


public class WxLoginInfo {
    private String code;
    private String iv;
    /**
     * 微信加密数据
     */
    private String data;
    private String nickname;
    private String avatar;
    private UserInfo userInfo;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getIv() {
        return iv;
    }

    public void setIv(String iv) {
        this.iv = iv;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public UserInfo getUserInfo() {
        if(this.userInfo == null) {
            this.userInfo = new UserInfo();
            this.userInfo.setNickName(this.nickname);
            this.userInfo.setAvatarUrl(this.avatar);
        }
        return userInfo;
    }

    public void setUserInfo(UserInfo userInfo) {
        this.userInfo = userInfo;
    }
}
